// TS方法装饰器的定义
// args数组第一个元素如果是静态方法是构造函数，动态方法是原型对象
// const showDecorator: MethodDecorator = (...args: any[]) => {
//   args[0].name = 'zrf'
// }
const showDecorator: MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {
  descriptor.value = () => {
    console.log('方法体重写');
  }
}

{
  class User2 {
    @showDecorator
    public show() {
      console.log('我是show方法体');

    }
  }
  new User2().show()
  // console.log(new User2().name);

}
